<?php

namespace app\index\controller;

use app\common\controller\Frontend;

class Index extends Frontend
{

    protected $noNeedLogin = '*';
    protected $noNeedRight = '*';
    protected $layout = '';

    public function index()
    {
        $info = \app\admin\model\Tickets::find(33);
        for ($i = 0; $i < 10; $i++) {
            $info['card_number'] = \app\admin\model\Tickets::getCode();
            unset($info['id']);
            unset($info['user_id']);
            unset($info['order_id']);
            $res = (new \app\admin\model\Tickets)->allowField(true)->save($info->toArray());
        }
        // return $this->view->fetch();
    }
}
